package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the per_kno_dyn database table.
 * 
 */
@Entity
@Table(name="per_kno_dyn")
@NamedQuery(name="PerKnoDyn.findAll", query="SELECT p FROM PerKnoDyn p")
public class PerKnoDyn implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int dynid;

	private String dyntext;

	//bi-directional many-to-one association to PerPmsEmp
	@ManyToOne
	@JoinColumn(name="EMPID")
	private PerPmsEmp perPmsEmp;

	//bi-directional many-to-one association to PerKnoWds
	@OneToMany(mappedBy="perKnoDyn")
	private List<PerKnoWds> perKnoWds;

	public PerKnoDyn() {
	}

	public int getDynid() {
		return this.dynid;
	}

	public void setDynid(int dynid) {
		this.dynid = dynid;
	}

	public String getDyntext() {
		return this.dyntext;
	}

	public void setDyntext(String dyntext) {
		this.dyntext = dyntext;
	}

	public PerPmsEmp getPerPmsEmp() {
		return this.perPmsEmp;
	}

	public void setPerPmsEmp(PerPmsEmp perPmsEmp) {
		this.perPmsEmp = perPmsEmp;
	}

	public List<PerKnoWds> getPerKnoWds() {
		return this.perKnoWds;
	}

	public void setPerKnoWds(List<PerKnoWds> perKnoWds) {
		this.perKnoWds = perKnoWds;
	}

	public PerKnoWds addPerKnoWd(PerKnoWds perKnoWd) {
		getPerKnoWds().add(perKnoWd);
		perKnoWd.setPerKnoDyn(this);

		return perKnoWd;
	}

	public PerKnoWds removePerKnoWd(PerKnoWds perKnoWd) {
		getPerKnoWds().remove(perKnoWd);
		perKnoWd.setPerKnoDyn(null);

		return perKnoWd;
	}

}